home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Technology Seed / Jan. '98 ATS.toast / QuickTime™ 3.0b11 / QTPublicInterfaces / CIncludes / MacTypes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-12  |  21.2 KB  |  726 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        MacTypes.h
  3.  
  4.      Contains:    Basic Macintosh data types.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 3.0 Beta
  8.  
  9.      Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __MACTYPES__
  19. #define __MACTYPES__
  20.  
  21. #ifndef __CONDITIONALMACROS__
  22. #include <ConditionalMacros.h>
  23. #endif
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. /********************************************************************************
  48.  
  49.     Special values in C
  50.     
  51.         NULL        The C standard for an impossible pointer value
  52.         nil            A carry over from pascal, NULL is prefered for C
  53.         
  54. *********************************************************************************/
  55. #ifndef NULL
  56.     /* Symantec C compilers (but not C++) want NULL and nil to be (void*)0  */
  57.     #if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))
  58.         #define NULL ((void *) 0)
  59.     #else
  60.         #define    NULL 0
  61.     #endif
  62. #endif
  63.  
  64. #ifndef nil
  65.     #define nil NULL
  66. #endif
  67.  
  68.  
  69. /********************************************************************************
  70.  
  71.     Base integer types for all target OS's and CPU's
  72.     
  73.         UInt8             8-bit unsigned integer    
  74.         SInt8             8-bit signed integer
  75.         UInt16            16-bit unsigned integer    
  76.         SInt16            16-bit signed integer            
  77.         UInt32            32-bit unsigned integer    
  78.         SInt32            32-bit signed integer    
  79.         UInt64            64-bit unsigned integer    
  80.         SInt64            64-bit signed integer    
  81.  
  82. *********************************************************************************/
  83. typedef unsigned char                     UInt8;
  84. typedef signed char                     SInt8;
  85. typedef unsigned short                     UInt16;
  86. typedef signed short                     SInt16;
  87. typedef unsigned long                     UInt32;
  88. typedef signed long                     SInt32;
  89. #if TARGET_RT_BIG_ENDIAN
  90.  
  91. struct wide {
  92.     SInt32                             hi;
  93.     UInt32                             lo;
  94. };
  95. typedef struct wide                        wide;
  96.  
  97. struct UnsignedWide {
  98.     UInt32                             hi;
  99.     UInt32                             lo;
  100. };
  101. typedef struct UnsignedWide                UnsignedWide;
  102. #else
  103.  
  104. struct wide {
  105.     UInt32                             lo;
  106.     SInt32                             hi;
  107. };
  108. typedef struct wide                        wide;
  109.  
  110. struct UnsignedWide {
  111.     UInt32                             lo;
  112.     UInt32                             hi;
  113. };
  114. typedef struct UnsignedWide                UnsignedWide;
  115. #endif  /* TARGET_RT_BIG_ENDIAN */
  116.  
  117.  
  118. #if TYPE_LONGLONG
  119. /*
  120.     Note:    wide and UnsignedWide must always be structs for source code
  121.             compatibility. On the other hand UInt64 and SInt64 can be
  122.             either a struct or a long long, depending on the compiler.
  123.             
  124.             If you use UInt64 and SInt64 you should do all operations on 
  125.             those data types through the functions/macros in Math64.h.  
  126.             This will assure that your code compiles with compilers that
  127.             support long long and those that don't.
  128. */
  129. typedef   signed long long                 SInt64;
  130. typedef unsigned long long              UInt64;
  131.  
  132. #else
  133.  
  134.  
  135. typedef wide                             SInt64;
  136. typedef UnsignedWide                     UInt64;
  137. #endif    /* TYPE_LONGLONG */
  138.  
  139. /********************************************************************************
  140.  
  141.     Base fixed point types 
  142.     
  143.         Fixed            16-bit signed integer plus 16-bit fraction
  144.         UnsignedFixed    16-bit unsigned integer plus 16-bit fraction
  145.         Fract            2-bit signed integer plus 30-bit fraction
  146.         ShortFixed        8-bit signed integer plus 8-bit fraction
  147.         
  148. *********************************************************************************/
  149. typedef long                             Fixed;
  150. typedef Fixed *                            FixedPtr;
  151. typedef long                             Fract;
  152. typedef Fract *                            FractPtr;
  153. typedef unsigned long                     UnsignedFixed;
  154. typedef short                             ShortFixed;
  155.  
  156.  
  157. /********************************************************************************
  158.  
  159.     Base floating point types 
  160.     
  161.         Float32            32 bit IEEE float:  1 sign bit, 8 exponent bits, 23 fraction bits
  162.         Float64            64 bit IEEE float:  1 sign bit, 11 exponent bits, 52 fraction bits    
  163.         Float80            80 bit MacOS float: 1 sign bit, 15 exponent bits, 1 integer bit, 63 fraction bits
  164.         Float96            96 bit 68881 float: 1 sign bit, 15 exponent bits, 16 pad bits, 1 integer bit, 63 fraction bits
  165.         
  166.     Note: These are fixed size floating point types, useful when writing a floating
  167.           point value to disk.  If your compiler does not support a particular size 
  168.           float, a struct is used instead.
  169.           Use of of the NCEG types (e.g. double_t) or an ANSI C type (e.g. double) if
  170.           you want a floating point representation that is natural for any given
  171.           compiler, but might be a different size on different compilers.
  172.  
  173. *********************************************************************************/
  174. typedef float                Float32;
  175. #if defined(__MWERKS__) || defined(THINK_C)
  176.     typedef short double    Float64;
  177. #else
  178.     typedef double            Float64;
  179. #endif
  180. #if TARGET_CPU_68K
  181.     #if TARGET_RT_MAC_68881
  182.         typedef long double    Float96;        
  183.         struct Float80 {
  184.             SInt16     exp;
  185.             UInt16     man[4];
  186.         };
  187.         typedef struct Float80 Float80;
  188.     #else
  189.         typedef long double    Float80;        
  190.         struct Float96 {
  191.             SInt16     exp[2];        /* the second 16-bits is always zero */
  192.             UInt16     man[4];
  193.         };
  194.         typedef struct Float96 Float96;
  195.     #endif
  196. #else
  197.     struct Float80 {
  198.         SInt16     exp;
  199.         UInt16     man[4];
  200.     };
  201.     typedef struct Float80 Float80;
  202.     
  203.     struct Float96 {
  204.         SInt16     exp[2];        /* the second 16-bits is always zero */
  205.         UInt16     man[4];
  206.     };
  207.     typedef struct Float96 Float96;
  208. #endif
  209.  
  210.  
  211.  
  212. /********************************************************************************
  213.  
  214.     MacOS Memory Manager types
  215.     
  216.         Ptr                Pointer to a non-relocatable block
  217.         Handle            Pointer to a master pointer to a relocatable block
  218.         Size            The number of bytes in a block (signed for historical reasons)
  219.         
  220. *********************************************************************************/
  221. typedef char *                            Ptr;
  222. typedef Ptr *                            Handle;
  223. typedef long                             Size;
  224.  
  225. /********************************************************************************
  226.  
  227.     Higher level basic types
  228.     
  229.         OSErr                    16-bit result error code
  230.         OSStatus                32-bit result error code
  231.         LogicalAddress            Address in the clients virtual address space
  232.         ConstLogicalAddress        Address in the clients virtual address space that will only be read
  233.         PhysicalAddress            Real address as used on the hardware bus
  234.         BytePtr                    Pointer to an array of bytes
  235.         ByteCount                The size of an array of bytes
  236.         ByteOffset                An offset into an array of bytes
  237.         ItemCount                32-bit iteration count
  238.         OptionBits                Standard 32-bit set of bit flags
  239.         PBVersion                ?
  240.         Duration                32-bit millisecond timer for drivers
  241.         AbsoluteTime            64-bit clock
  242.         ScriptCode                The coarse features of a written language (e.g. Roman vs Cyrillic)
  243.         LangCode                A particular language (e.g. English)
  244.         RegionCode                A variation of a language (British vs American English)
  245.         FourCharCode            A 32-bit value made by packing four 1 byte characters together
  246.         OSType                    A FourCharCode used in the OS and file system (e.g. creator)
  247.         ResType                    A FourCharCode used to tag resources (e.g. 'DLOG')
  248.         
  249. *********************************************************************************/
  250. typedef SInt16                             OSErr;
  251. typedef SInt32                             OSStatus;
  252. typedef void *                            LogicalAddress;
  253. typedef const void *                    ConstLogicalAddress;
  254. typedef void *                            PhysicalAddress;
  255. typedef UInt8 *                            BytePtr;
  256. typedef UInt32                             ByteCount;
  257. typedef UInt32                             ByteOffset;
  258. typedef SInt32                             Duration;
  259. typedef UnsignedWide                     AbsoluteTime;
  260. typedef UInt32                             OptionBits;
  261. typedef UInt32                             ItemCount;
  262. typedef UInt32                             PBVersion;
  263. typedef SInt16                             ScriptCode;
  264. typedef SInt16                             LangCode;
  265. typedef SInt16                             RegionCode;
  266. typedef unsigned long                     FourCharCode;
  267. typedef FourCharCode                     OSType;
  268. typedef FourCharCode                     ResType;
  269. typedef OSType *                        OSTypePtr;
  270. typedef ResType *                        ResTypePtr;
  271.  
  272. enum {
  273.     kUnknownType                = 0x3F3F3F3F                    /* '????' * default unknown type */
  274. };
  275.  
  276.  
  277. /********************************************************************************
  278.  
  279.     Boolean types and values
  280.     
  281.         Boolean            A one byte value, holds "false" (0) or "true" (1)
  282.         false            The Boolean value of zero (0)
  283.         true            The Boolean value of one (1)
  284.         
  285. *********************************************************************************/
  286. /*
  287.     The identifiers "true" and "false" are becoming keywords in C++
  288.     and work with the new built-in type "bool"
  289.     "Boolean" will remain an unsigned char for compatibility with source
  290.     code written before "bool" existed.
  291. */
  292.  
  293. #if TARGET_OS_WIN32
  294.     #pragma warning (disable: 4237)
  295. #endif
  296. #if !TYPE_BOOL
  297.  
  298. enum {
  299.     false                        = 0,
  300.     true                        = 1
  301. };
  302.  
  303. #endif  /*  !TYPE_BOOL */
  304.  
  305.  
  306. #if TARGET_OS_WIN32
  307.     #pragma warning (default: 4237)
  308. #endif
  309. typedef unsigned char                     Boolean;
  310.  
  311.  
  312. /********************************************************************************
  313.  
  314.     Function Pointer Types
  315.     
  316.         ProcPtr                    Generic pointer to a function
  317.         Register68kProcPtr        Pointer to a 68K function that expects parameters in registers
  318.         UniversalProcPtr        Pointer to classic 68K code or a RoutineDescriptor
  319.         
  320.         ProcHandle                Pointer to a ProcPtr
  321.         UniversalProcHandle        Pointer to a UniversalProcPtr
  322.         
  323. *********************************************************************************/
  324. typedef CALLBACK_API_C( long , ProcPtr )();
  325. typedef CALLBACK_API( void , Register68kProcPtr )();
  326. #if TARGET_OS_MAC && TARGET_RT_MAC_CFM
  327. /*    Note that the RoutineDescriptor structure is defined in the MixedMode.h header */
  328. typedef struct RoutineDescriptor *UniversalProcPtr;
  329. #else
  330. typedef ProcPtr                         UniversalProcPtr;
  331. #endif  /* TARGET_OS_MAC && TARGET_RT_MAC_CFM */
  332.  
  333. typedef ProcPtr *                        ProcHandle;
  334. typedef UniversalProcPtr *                UniversalProcHandle;
  335.  
  336.  
  337. /********************************************************************************
  338.  
  339.     Common Constants
  340.     
  341.         noErr                    OSErr: function performed properly - no error
  342.         kNilOptions                OptionBits: all flags false
  343.         kInvalidID                KernelID: NULL is for pointers as kInvalidID is for ID's
  344.         kVariableLengthArray    array bounds: variable length array
  345.  
  346.     Note: kVariableLengthArray is used in array bounds to specify a variable length array.
  347.           It is ususally used in variable length structs when the last field is an array
  348.           of any size.  Before ANSI C, we used zero as the bounds of variable length 
  349.           array, but zero length array are illegal in ANSI C.  Example usage:
  350.     
  351.         struct FooList 
  352.         {
  353.             short     listLength;
  354.             Foo        elements[kVariableLengthArray];
  355.         };
  356.         
  357. *********************************************************************************/
  358.  
  359. enum {
  360.     noErr                        = 0
  361. };
  362.  
  363.  
  364. enum {
  365.     kNilOptions                    = 0
  366. };
  367.  
  368. #define kInvalidID     0
  369.  
  370. enum {
  371.     kVariableLengthArray        = 1
  372. };
  373.  
  374.  
  375.  
  376. /********************************************************************************
  377.  
  378.     String Types
  379.     
  380.         UniChar                    A single UniCode character (16-bits)
  381.  
  382.         StrNNN                    Pascal string holding up to NNN bytes
  383.         StringPtr                Pointer to a pascal string
  384.         StringHandle            Pointer to a StringPtr
  385.         ConstStrNNNParam        For function parameters only - means string is const
  386.         
  387.         CStringPtr                Pointer to a C string       (same as:  char*)
  388.         ConstCStringPtr            Pointer to a const C string (same as:  const char*)
  389.         
  390.     Note: The length of a pascal string is stored in the first byte.
  391.           A pascal string does not have a termination byte and can be at most 255 bytes long.
  392.           The first character in a pascal string is offset one byte from the start of the string. 
  393.           
  394.           A C string is terminated with a byte of value zero.  
  395.           A C string has no length limitation.
  396.           The first character in a C string is the first byte of the string. 
  397.           
  398.         
  399. *********************************************************************************/
  400. typedef UInt16                             UniChar;
  401. typedef unsigned char                     Str255[256];
  402. typedef unsigned char                     Str63[64];
  403. #if TARGET_OS_MAC
  404. typedef Str63                             StrFileName;
  405. #else
  406. typedef Str255                             StrFileName;
  407. #endif  /* TARGET_OS_MAC */
  408.  
  409. typedef unsigned char                     Str32[33];
  410. typedef unsigned char                     Str31[32];
  411. typedef unsigned char                     Str27[28];
  412. typedef unsigned char                     Str15[16];
  413. /*
  414.     The type Str32 is used in many AppleTalk based data structures.
  415.     It holds up to 32 one byte chars.  The problem is that with the
  416.     length byte it is 33 bytes long.  This can cause weird alignment
  417.     problems in structures.  To fix this the type "Str32Field" has
  418.     been created.  It should only be used to hold 32 chars, but
  419.     it is 34 bytes long so that there are no alignment problems.
  420. */
  421. typedef unsigned char                     Str32Field[34];
  422. typedef unsigned char *                    StringPtr;
  423. typedef StringPtr *                        StringHandle;
  424. typedef const unsigned char *            ConstStr255Param;
  425. typedef const unsigned char *            ConstStr63Param;
  426. #if TARGET_OS_MAC
  427. typedef ConstStr63Param                 ConstStrFileNameParam;
  428. #else
  429. typedef ConstStr255Param                 ConstStrFileNameParam;
  430. #endif  /* TARGET_OS_MAC */
  431.  
  432. typedef const unsigned char *            ConstStr32Param;
  433. typedef const unsigned char *            ConstStr31Param;
  434. typedef const unsigned char *            ConstStr27Param;
  435. typedef const unsigned char *            ConstStr15Param;
  436. #ifdef __cplusplus
  437. inline unsigned char StrLength(ConstStr255Param string) { return (*string); }
  438. #else
  439. #define StrLength(string) (*(unsigned char *)(string))
  440. #endif  /*  defined(__cplusplus)  */
  441.  
  442. #if OLDROUTINENAMES
  443. #define Length(string) StrLength(string)
  444. #endif  /* OLDROUTINENAMES */
  445.  
  446. /********************************************************************************
  447.  
  448.     Quickdraw Types
  449.     
  450.         Point                2D Quickdraw coordinate, range: -32K to +32K
  451.         Rect                Rectangluar Quickdraw area
  452.         Style                Quickdraw font rendering styles
  453.         StyleParameter        Style when used as a parameter (historical 68K convention)
  454.         StyleField            Style when used as a field (historical 68K convention)
  455.         CharParameter        Char when used as a parameter (historical 68K convention)
  456.         
  457.     Note:   The original Macintosh toolbox in 68K Pascal defined Style as a SET.  
  458.             Both Style and CHAR occupy 8-bits in packed records or 16-bits when 
  459.             used as fields in non-packed records or as parameters. 
  460.         
  461. *********************************************************************************/
  462.  
  463. struct Point {
  464.     short                             v;
  465.     short                             h;
  466. };
  467. typedef struct Point                    Point;
  468. typedef Point *                            PointPtr;
  469.  
  470. struct Rect {
  471.     short                             top;
  472.     short                             left;
  473.     short                             bottom;
  474.     short                             right;
  475. };
  476. typedef struct Rect                        Rect;
  477. typedef Rect *                            RectPtr;
  478.  
  479. typedef short                             CharParameter;
  480.  
  481. enum {
  482.     normal                        = 0,
  483.     bold                        = 1,
  484.     italic                        = 2,
  485.     underline                    = 4,
  486.     outline                        = 8,
  487.     shadow                        = 0x10,
  488.     condense                    = 0x20,
  489.     extend                        = 0x40
  490. };
  491.  
  492. typedef unsigned char                     Style;
  493. typedef short                             StyleParameter;
  494. typedef Style                             StyleField;
  495.  
  496.  
  497. /********************************************************************************
  498.  
  499.     THINK C base objects
  500.  
  501.         HandleObject        Root class for handle based THINK C++ objects
  502.         PascalObject        Root class for pascal style objects in THINK C++ 
  503.  
  504. *********************************************************************************/
  505. #if defined(__SC__) && !defined(__STDC__) && defined(__cplusplus)
  506.     class __machdl HandleObject {};
  507.     #if TARGET_CPU_68K
  508.         class __pasobj PascalObject {};
  509.     #endif
  510. #endif
  511.  
  512.  
  513. /********************************************************************************
  514.  
  515.     MacOS versioning structures
  516.     
  517.         VersRec                    Contents of a 'vers' resource
  518.         VersRecPtr                Pointer to a VersRecPtr
  519.         VersRecHndl                Resource Handle containing a VersRec
  520.         NumVersion                Packed BCD version representation (e.g. "4.2.1a3" is 0x04214003)
  521.         UniversalProcPtr        Pointer to classic 68K code or a RoutineDescriptor
  522.         
  523.         ProcHandle                Pointer to a ProcPtr
  524.         UniversalProcHandle        Pointer to a UniversalProcPtr
  525.         
  526. *********************************************************************************/
  527. #if TARGET_RT_LITTLE_ENDIAN
  528.  
  529. struct NumVersion {
  530.                                                                 /* Numeric version part of 'vers' resource */
  531.     UInt8                             nonRelRev;                    /*revision level of non-released version*/
  532.     UInt8                             stage;                        /*stage code: dev, alpha, beta, final*/
  533.     UInt8                             minorAndBugRev;                /*2nd & 3rd part of version number share a byte*/
  534.     UInt8                             majorRev;                    /*1st part of version number in BCD*/
  535. };
  536. typedef struct NumVersion                NumVersion;
  537. #else
  538.  
  539. struct NumVersion {
  540.                                                                 /* Numeric version part of 'vers' resource */
  541.     UInt8                             majorRev;                    /*1st part of version number in BCD*/
  542.     UInt8                             minorAndBugRev;                /*2nd & 3rd part of version number share a byte*/
  543.     UInt8                             stage;                        /*stage code: dev, alpha, beta, final*/
  544.     UInt8                             nonRelRev;                    /*revision level of non-released version*/
  545. };
  546. typedef struct NumVersion                NumVersion;
  547. #endif  /* TARGET_RT_LITTLE_ENDIAN */
  548.  
  549.  
  550. enum {
  551.                                                                 /* Version Release Stage Codes */
  552.     developStage                = 0x20,
  553.     alphaStage                    = 0x40,
  554.     betaStage                    = 0x60,
  555.     finalStage                    = 0x80
  556. };
  557.  
  558.  
  559. union NumVersionVariant {
  560.                                                                 /* NumVersionVariant is a wrapper so NumVersion can be accessed as a 32-bit value */
  561.     NumVersion                         parts;
  562.     unsigned long                     whole;
  563. };
  564. typedef union NumVersionVariant            NumVersionVariant;
  565.  
  566. struct VersRec {
  567.                                                                 /* 'vers' resource format */
  568.     NumVersion                         numericVersion;                /*encoded version number*/
  569.     short                             countryCode;                /*country code from intl utilities*/
  570.     Str255                             shortVersion;                /*version number string - worst case*/
  571.     Str255                             reserved;                    /*longMessage string packed after shortVersion*/
  572. };
  573. typedef struct VersRec                    VersRec;
  574. typedef VersRec *                        VersRecPtr;
  575. typedef VersRecPtr *                    VersRecHndl;
  576. /*********************************************************************************
  577.  
  578.     Old names for types
  579.         
  580. *********************************************************************************/
  581.  
  582. typedef UInt8                             Byte;
  583. typedef SInt8                             SignedByte;
  584. typedef wide *                            WidePtr;
  585. typedef UnsignedWide *                    UnsignedWidePtr;
  586. typedef Float80                         extended80;
  587. typedef Float96                         extended96;
  588. typedef SInt8                             VHSelect;
  589.  
  590. /*********************************************************************************
  591.  
  592.     Debugger functions:
  593.     
  594.     Name            MacsBug            Macintosh Debugger                    Copland Debugger
  595.     ----------        -----------        -----------------------------        -------------------
  596.     Debugger        yes                InterfaceLib maps to DebugStr        yes
  597.     DebugStr        yes                yes                                    yes
  598.     Debugger68k        yes                InterfaceLib maps to DebugStr        obsolete?
  599.     DebugStr68k        yes                InterfaceLib maps to DebugStr        obsolete?
  600.     debugstr        yes                InterfaceLib maps to DebugStr        yes
  601.     SysBreak        no                InterfaceLib maps to SysError        obsolete?
  602.     SysBreakStr        no                InterfaceLib maps to SysError        obsolete?
  603.     SysBreakFunc    no                InterfaceLib maps to SysError        obsolete?
  604.     SysDebug        ?                ?                                    ?
  605.     SysDebugStr        ?                ?                                    ?
  606.     LLDebugger        no                yes                                    Low Level Nub
  607.     LLDebugStr        no                yes                                    Low Level Nub
  608.     
  609. *********************************************************************************/
  610.  
  611. EXTERN_API( void )
  612. Debugger                        (void)                                                        ONEWORDINLINE(0xA9FF);
  613.  
  614. EXTERN_API( void )
  615. DebugStr                        (ConstStr255Param         debuggerMsg)                        ONEWORDINLINE(0xABFF);
  616.  
  617. #if TARGET_OS_MAC
  618. #if CGLUESUPPORTED
  619. EXTERN_API_C( void )
  620. debugstr                        (const char *            debuggerMsg);
  621.  
  622. #endif  /* CGLUESUPPORTED */
  623.  
  624. #if TARGET_CPU_PPC
  625. /* Only for System 7 native drivers */
  626. EXTERN_API_C( void )
  627. SysDebug                        (void);
  628.  
  629. EXTERN_API_C( void )
  630. SysDebugStr                        (ConstStr255Param         str);
  631.  
  632. #endif  /* TARGET_CPU_PPC */
  633.  
  634. /* SADE break points */
  635. EXTERN_API( void )
  636. SysBreak                        (void)                                                        THREEWORDINLINE(0x303C, 0xFE16, 0xA9C9);
  637.  
  638. EXTERN_API( void )
  639. SysBreakStr                        (ConstStr255Param         debuggerMsg)                        THREEWORDINLINE(0x303C, 0xFE15, 0xA9C9);
  640.  
  641. EXTERN_API( void )
  642. SysBreakFunc                    (ConstStr255Param         debuggerMsg)                        THREEWORDINLINE(0x303C, 0xFE14, 0xA9C9);
  643.  
  644. /* old names for Debugger and DebugStr */
  645. #if OLDROUTINENAMES && TARGET_CPU_68K
  646.     #define Debugger68k()    Debugger()
  647.     #define DebugStr68k(s)    DebugStr(s)
  648. #endif
  649. #endif  /* TARGET_OS_MAC */
  650.  
  651. /*
  652.    These types are used for structures that contain data that is
  653.    always in BigEndian format.  This extra typing prevents little
  654.    endian code from directly changing the data, thus saving much
  655.    time in the debugger.
  656. */
  657. #if TARGET_RT_LITTLE_ENDIAN
  658.  
  659. struct BigEndianLong {
  660.     long                             bigEndianValue;
  661. };
  662. typedef struct BigEndianLong            BigEndianLong;
  663.  
  664. struct BigEndianUnsignedLong {
  665.     unsigned long                     bigEndianValue;
  666. };
  667. typedef struct BigEndianUnsignedLong    BigEndianUnsignedLong;
  668.  
  669. struct BigEndianShort {
  670.     short                             bigEndianValue;
  671. };
  672. typedef struct BigEndianShort            BigEndianShort;
  673.  
  674. struct BigEndianUnsignedShort {
  675.     unsigned short                     bigEndianValue;
  676. };
  677. typedef struct BigEndianUnsignedShort    BigEndianUnsignedShort;
  678.  
  679. struct BigEndianFixed {
  680.     Fixed                             bigEndianValue;
  681. };
  682. typedef struct BigEndianFixed            BigEndianFixed;
  683.  
  684. struct BigEndianUnsignedFixed {
  685.     UnsignedFixed                     bigEndianValue;
  686. };
  687. typedef struct BigEndianUnsignedFixed    BigEndianUnsignedFixed;
  688.  
  689. struct BigEndianOSType {
  690.     OSType                             bigEndianValue;
  691. };
  692. typedef struct BigEndianOSType            BigEndianOSType;
  693. #else
  694.  
  695. typedef long                             BigEndianLong;
  696. typedef unsigned long                     BigEndianUnsignedLong;
  697. typedef short                             BigEndianShort;
  698. typedef unsigned short                     BigEndianUnsignedShort;
  699. typedef Fixed                             BigEndianFixed;
  700. typedef UnsignedFixed                     BigEndianUnsignedFixed;
  701. typedef OSType                             BigEndianOSType;
  702. #endif  /* TARGET_RT_LITTLE_ENDIAN */
  703.  
  704.  
  705.  
  706. #if PRAGMA_STRUCT_ALIGN
  707.     #pragma options align=reset
  708. #elif PRAGMA_STRUCT_PACKPUSH
  709.     #pragma pack(pop)
  710. #elif PRAGMA_STRUCT_PACK
  711.     #pragma pack()
  712. #endif
  713.  
  714. #ifdef PRAGMA_IMPORT_OFF
  715. #pragma import off
  716. #elif PRAGMA_IMPORT
  717. #pragma import reset
  718. #endif
  719.  
  720. #ifdef __cplusplus
  721. }
  722. #endif
  723.  
  724. #endif /* __MACTYPES__ */
  725.  
  726.